#!usr/bin/env python
# -*- coding: utf-8 -*-
import frida

def on_message(message, data):
    print(message)
    #print(data)
    #print("[on_message] message:", message, "data:", data)
#processes = frida.get_remote_device().enumerate_processes()
#for process in processes:
#    print(process)

session = frida.get_remote_device().attach(479)


jscode = """ 
Java.perform(function(){              
    Java.enumerateLoadedClasses({     
        onMatch: function(className) {
             console.log(className);
        },        
        onComplete:function(){        
             console.log("done");             
        }                             
    }); 
  });  
"""

script = session.create_script(jscode)

script.on("message", on_message)
script.load()

